package liveresource

import (
	dbModel "ZHONGYIHANGYAN/bean/dbModel"
	"ZHONGYIHANGYAN/mysql"
)

type LiveResourceManage struct {
	mysql.DataBase
}

var defaultLiveResourceManage = &LiveResourceManage{}

func Manage() *LiveResourceManage {
	return defaultLiveResourceManage
}

// 初始化指标表
func InitTable(DB *mysql.MysqlGorm) {
	defaultLiveResourceManage.DataBase = DB
	defaultLiveResourceManage.autoMigrate()
}

func (m *LiveResourceManage) autoMigrate() {
	m.DataBase.AutoMigrate(&dbModel.LiveResource{})
}
